home *** CD-ROM | disk | FTP | other *** search
/ Aminet 28 / Aminet 28 (1998)(GTI - Schatztruhe)[!][Dec 1998].iso / Aminet / comm / tcp / miamicontrol.lha / MiamiControl / SetCosts < prev   
Encoding:
Text File  |  1998-10-17  |  3.2 KB  |  50 lines

  1. ;$VER: SetCosts 1.2 (23.09.98) Copyright © Thomas Hurst 1998
  2.  
  3. if not exists Env:peakrate
  4.     Set goahead `Requestchoice "Change costs""This script will set up all your phone costs.*nIf it fails to work, refer to the docs under troubleshooting*nAs this is the first time you ran this, you must set it up, or Miami Control will fail to work.*nUK (i.e. BT) defaults will be set up. If they are correct, just cancel each requester*nuntil it asks you if your settings are correct.""Change|Stop!"`
  5.     Setenv peakrate 3.95
  6.     Setenv eveningrate 1.5
  7.     Setenv weekendrate 1
  8.     setenv mincharge 5
  9.     Set peakstart 08
  10.     Set peakend 18
  11. Else
  12.     set peakstart `Echo $peakratetimes first=0 len=2`
  13.     set peakend  `Echo $peakratetimes len=2`
  14.  
  15.  
  16.     Set goahead `Requestchoice "Change costs""This script will set up all your phone costs.*nIf it fails to work, refer to the docs under troubleshooting*n*nYour current settings are:*n*nPeak Rate = $peakrate*nEvening Rate = $eveningrate*nWeekend Rate = $weekendrate*nMinimum charge = $mincharge*nPeak rate starts at $peakstart:00*nPeak rate ends at $peakend:00.*n""Change|Stop!"`
  17. Endif
  18.  
  19. If $goahead EQ 1
  20.         setenv peakrate `Requeststring "Phone Costs""Please enter how much your*npeak rate calls cost per minute in Pence*nCurrently $peakrate." reqpos centre`
  21.         setenv eveningrate `Requeststring "Phone Costs""Please enter how much your*n evening rate calls cost per minute in Pence*nCurrently $eveningrate." reqpos centre`
  22.         setenv weekendrate `Requeststring "Phone Costs""Please enter how much your*n weekend rate calls cost per minute in Pence*nCurrently $weekendrate." reqpos centre`
  23.         setenv mincharge `Requeststring "Phone Costs""Please enter your providers minimum charge*nCurrently $mincharge." reqpos centre`
  24.  
  25.  
  26.         set peakstart `RequestString "Peak Rate Time""Please enter the hour peak rate starts.*ne.g. for UK users, enter *"08*"*n*nCurrently $peakstart*n*nNote: You MUST enter 2 figures here, as in the example!" reqpos centre`
  27.         set peakend `RequestString "Peak Rate Time""Please enter the hour peak rate ends.*ne.g. for UK users, enter *"18*"*n*nCurrently $peakend*n*nNote: You MUST enter 2 figures here, as in the example!" reqpos centre`
  28.  
  29.  
  30.         Set save `Requestchoice "Save?""Your setting are now:*n*nPeak Rate = $peakrate*nEvening Rate = $eveningrate*nWeekend Rate = $weekendrate*nMinimum charge = $mincharge*nPeak rate starts at $peakstart:00*nPeak rate ends at $peakend:00.*n*nAre these correct?""Yes - Save|No - Discard"`
  31.         If $save EQ 1
  32.                 Copy Env:peakrate Envarc:
  33.                 Copy Env:eveningrate Envarc:
  34.                 Copy Env:weekendrate Envarc:
  35.                 Copy Env:mincharge Envarc:
  36.                 Echo $peakstart >Env:peakratetimes NOLINE
  37.                 Echo $peakend >>Env:peakratetimes
  38.                 Copy Env:peakratetimes Envarc:
  39.                 Requestchoice "Done""Your settings have been updated""Good" >NIL:
  40.         Else
  41.                 Copy Envarc:peakrate Env:
  42.                 Copy Envarc:eveningrate Env:
  43.                 Copy Envarc:weekendrate Env:
  44.                 copy Envarc:mincharge Env:
  45.                 Requestchoice "Finished""Settings restored to old values""Good" >NIL:
  46.         Endif
  47. Else
  48.         Quit 0
  49. Endif
  50.